﻿using ProtoBuf;
namespace PnJ.Aliyun.OTS.Models
{
    /// <summary>
    /// 在UpdateRow中，表示更新一列的信息
    /// </summary>
    [ProtoContract(Name = "ColumnUpdate ")]
    public class ColumnUpdate
    {
        public ColumnUpdate()
        {

        }
        public ColumnUpdate(OperationType operrationType,string name,ColumnValue columnValue)
        {
            this.Type = operrationType;
            this.Name = name;
            this.Value = columnValue;
        }
        /// <summary>
        /// 对该列的修改方式，更新或删除
        /// </summary>
        [ProtoMember(1, Name = "type", IsRequired = true)]
        public OperationType Type { get; set; }
        /// <summary>
        /// 该列的列名
        /// </summary>
        [ProtoMember(2, Name = "name", IsRequired = true)]
        public string Name { get; set; }
        /// <summary>
        ///  该列更新后的列值，在type为PUT时有效
        /// </summary>
        [ProtoMember(3, Name = "value")]
        public ColumnValue Value { get; set; }
    }
}
